/*
 * @Author: 迷洛洛ywc
 * @Date: 2024-06-24 09:43:40
 * @LastEditors: 迷洛洛ywc
 * @LastEditTime: 2024-06-27 16:04:38
 * @Description: file content
 */
import request from '@/utils/request'
// 添加时查询用户信息
export const getUserListApi = (baseId) => request.get(`/userinfo/list?baseId=${baseId}`)
// 查询地块list
export const getLandListApi = (baseId) => request.get(`/landinfo/list?baseId=${baseId}`)
// 查询地块list
export function getLandListCopyApi (params) {
  return request({
    url: '/landinfo/list',
    method: 'get',
    params
  })
}
// 地块新增
export const addLandApi = (data) => request.post('/landinfo/add', data)
// 地块编辑
export const updateLandApi = (data) => request.patch('/landinfo/updateById', data)

// 地块删除
export const removeLandApi = (data) => request.delete('/landinfo/removeByIds', data)

// 获取基地信息
export const getBaseInfoApi = (baseId) => request.get(`/baseinfo/getDetailById/${baseId}`)
// 根据父编码查询子类字典
export const getSonDictByCodeApi = (code) => request.get(`/sysdic/getSonDictByCode?code=${code}`)
